triggers: We need to order their execution
authorColin Walters <walters@verbum.org>
Mon, 20 Feb 2012 01:52:50 +0000 (20:52 -0500)
committerColin Walters <walters@verbum.org>
Mon, 20 Feb 2012 01:52:50 +0000 (20:52 -0500)
Otherwise we run in inode order which is unpredictable.  In particular
this causes problems because we might run e.g. the gtk+ trigger before
the gdk-pixbuf one.  And ldconfig should really be first.

22 files changed:
Makefile-triggers.am
src/triggers/ostree-run-triggers.c
src/triggers/triggers.d/0001ldconfig.trigger [new file with mode: 0755]
src/triggers/triggers.d/0010mime-database.trigger [new file with mode: 0755]
src/triggers/triggers.d/0020dconf.trigger [new file with mode: 0755]
src/triggers/triggers.d/0030glib.trigger [new file with mode: 0755]
src/triggers/triggers.d/0040gdk-pixbuf.trigger [new file with mode: 0755]
src/triggers/triggers.d/0050gconf.trigger [new file with mode: 0755]
src/triggers/triggers.d/0060immodules.trigger [new file with mode: 0755]
src/triggers/triggers.d/0070pango.trigger [new file with mode: 0755]
src/triggers/triggers.d/0080gtk+.trigger [new file with mode: 0755]
src/triggers/triggers.d/0090desktop-database.trigger [new file with mode: 0755]
src/triggers/triggers.d/dconf.trigger [deleted file]
src/triggers/triggers.d/desktop-database.trigger [deleted file]
src/triggers/triggers.d/gconf.trigger [deleted file]
src/triggers/triggers.d/gdk-pixbuf.trigger [deleted file]
src/triggers/triggers.d/glib.trigger [deleted file]
src/triggers/triggers.d/gtk+.trigger [deleted file]
src/triggers/triggers.d/immodules.trigger [deleted file]
src/triggers/triggers.d/ldconfig.trigger [deleted file]
src/triggers/triggers.d/mime-database.trigger [deleted file]
src/triggers/triggers.d/pango.trigger [deleted file]

index 172a7c6af03c64a8a6c54f53ec7a4d015ee08826..a4d54fc7760cdf89c923af4d5cd59402c81e20da 100644 (file)
 
 triggersdir = $(libexecdir)/ostree/triggers.d
 triggers_SCRIPTS = \
-       src/triggers/triggers.d/dconf.trigger \
-       src/triggers/triggers.d/desktop-database.trigger \
-       src/triggers/triggers.d/gdk-pixbuf.trigger \
-       src/triggers/triggers.d/gconf.trigger \
-       src/triggers/triggers.d/glib.trigger \
-       src/triggers/triggers.d/gtk+.trigger \
-       src/triggers/triggers.d/immodules.trigger \
-       src/triggers/triggers.d/ldconfig.trigger \
-       src/triggers/triggers.d/mime-database.trigger \
-       src/triggers/triggers.d/pango.trigger \
+       src/triggers/triggers.d/0001ldconfig.trigger \
+       src/triggers/triggers.d/0010mime-database.trigger \
+       src/triggers/triggers.d/0020dconf.trigger \
+       src/triggers/triggers.d/0030glib.trigger \
+       src/triggers/triggers.d/0040gdk-pixbuf.trigger \
+       src/triggers/triggers.d/0050gconf.trigger \
+       src/triggers/triggers.d/0060immodules.trigger \
+       src/triggers/triggers.d/0070pango.trigger \
+       src/triggers/triggers.d/0080gtk+.trigger \
+       src/triggers/triggers.d/0090desktop-database.trigger \
        $(NULL)
 
 bin_PROGRAMS += ostree-run-triggers
index 29f036b0fd6a6ce90cde0e84f74d24b7d707d1c6..7145cb6aadc7782d2a8b10976d4504373f060558 100644 (file)
@@ -128,9 +128,26 @@ check_trigger (GFile          *trigger,
   return ret;
 }
 
+static int
+compare_files_by_basename (gconstpointer  ap,
+                           gconstpointer  bp)
+{
+  GFile *a = (GFile*)ap;
+  GFile *b = (GFile*)ap;
+  char *name_a, *name_b;
+  int c;
 
-gboolean
-run_triggers (GError        **error)
+  name_a = g_file_get_basename (a);
+  name_b = g_file_get_basename (b);
+  c = strcmp (name_a, name_b);
+  g_free (name_b);
+  g_free (name_a);
+  return c;
+}
+
+static gboolean
+get_sorted_triggers (GPtrArray       **out_triggers,
+                     GError          **error)
 {
   gboolean ret = FALSE;
   GError *temp_error = NULL;
@@ -138,6 +155,9 @@ run_triggers (GError        **error)
   GFile *triggerdir = NULL;
   GFileInfo *file_info = NULL;
   GFileEnumerator *enumerator = NULL;
+  GPtrArray *ret_triggers = NULL;
+
+  ret_triggers = g_ptr_array_new_with_free_func ((GDestroyNotify)g_object_unref);
 
   triggerdir_path = g_build_filename (LIBEXECDIR, "ostree", "triggers.d", NULL);
   triggerdir = g_file_new_for_path (triggerdir_path);
@@ -153,40 +173,68 @@ run_triggers (GError        **error)
     {
       const char *name;
       guint32 type;
-      char *child_path = NULL;
-      GFile *child = NULL;
-      gboolean success;
 
       name = g_file_info_get_attribute_byte_string (file_info, "standard::name"); 
       type = g_file_info_get_attribute_uint32 (file_info, "standard::type");
       
       if (type == G_FILE_TYPE_REGULAR && g_str_has_suffix (name, ".trigger"))
         {
+          char *child_path;
+          GFile *child;
+
           child_path = g_build_filename (triggerdir_path, name, NULL);
           child = g_file_new_for_path (child_path);
+          g_free (child_path);
 
-          success = check_trigger (child, error);
+          g_ptr_array_add (ret_triggers, child);
         }
-      else
-        success = TRUE;
-
-      g_object_unref (file_info);
-      g_free (child_path);
-      g_clear_object (&child);
-      if (!success)
-        goto out;
+      g_clear_object (&file_info);
     }
   if (file_info == NULL && temp_error != NULL)
     {
       g_propagate_error (error, temp_error);
       goto out;
     }
+  
+  g_ptr_array_sort (ret_triggers, compare_files_by_basename);
 
   ret = TRUE;
+  if (out_triggers)
+    {
+      *out_triggers = ret_triggers;
+      ret_triggers = NULL;
+    }
  out:
   g_free (triggerdir_path);
   g_clear_object (&triggerdir);
   g_clear_object (&enumerator);
+  if (ret_triggers)
+    g_ptr_array_unref (ret_triggers);
+  return ret;
+}
+
+gboolean
+run_triggers (GError        **error)
+{
+  gboolean ret = FALSE;
+  int i;
+  GPtrArray *triggers = NULL;
+
+  if (!get_sorted_triggers (&triggers, error))
+    goto out;
+
+  for (i = 0; i < triggers->len; i++)
+    {
+      GFile *trigger = triggers->pdata[i];
+
+      if (!check_trigger (trigger, error))
+        goto out;
+    }
+
+  ret = TRUE;
+ out:
+  if (triggers)
+    g_ptr_array_unref (triggers);
   return ret;
 }
 
diff --git a/src/triggers/triggers.d/0001ldconfig.trigger b/src/triggers/triggers.d/0001ldconfig.trigger
new file mode 100755 (executable)
index 0000000..b412603
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Post-installation hook for shared libraries.  -*- mode: sh -*-
+#
+# Written by Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: ldconfig
+# REMatch: /lib.*/\.so.*
+
+ldconfig -r .
diff --git a/src/triggers/triggers.d/0010mime-database.trigger b/src/triggers/triggers.d/0010mime-database.trigger
new file mode 100755 (executable)
index 0000000..bfe301f
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Post-installation hook for shared-mime-info.  -*- mode: sh -*-
+#
+# Written by Matthias Clasen <mclasen@redhat.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: update-mime-database
+# REMatch: /mime/packages/.*\.xml
+
+exec update-mime-database ./usr/share/mime
diff --git a/src/triggers/triggers.d/0020dconf.trigger b/src/triggers/triggers.d/0020dconf.trigger
new file mode 100755 (executable)
index 0000000..335364c
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Post-installation hook for system dconf schemas.  -*- mode: sh -*-
+#
+# Written by Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: dconf
+# LiteralMatch: /etc/dconf/*
+
+exec dconf update
diff --git a/src/triggers/triggers.d/0030glib.trigger b/src/triggers/triggers.d/0030glib.trigger
new file mode 100755 (executable)
index 0000000..734b672
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Post-installation hook for glib/gschema.  -*- mode: sh -*-
+#
+# Written by Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: glib-compile-schemas
+# LiteralMatch: /share/glib-2.0/schemas/
+
+exec glib-compile-schemas ./usr/share/glib-2.0/schemas
diff --git a/src/triggers/triggers.d/0040gdk-pixbuf.trigger b/src/triggers/triggers.d/0040gdk-pixbuf.trigger
new file mode 100755 (executable)
index 0000000..07c84b0
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Post-installation hook for gdk-pixbuf.  -*- mode: sh -*-
+# Corresponds to gdk-pixbuf/gdk-pixbuf/Makefile.am:install-data-hook
+#
+# Written by Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: gdk-pixbuf-query-loaders
+# RequiresChroot: true
+# LiteralMatch: /gdk-pixbuf-2.0/2.10.0/loaders/
+
+exec gdk-pixbuf-query-loaders --update-cache
diff --git a/src/triggers/triggers.d/0050gconf.trigger b/src/triggers/triggers.d/0050gconf.trigger
new file mode 100755 (executable)
index 0000000..8b4df90
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+# Post-installation hook for GConf.  -*- mode: sh -*-
+#
+# Written by Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: gconftool-2
+# LiteralMatch: /etc/gconf
+
+GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
+export GCONF_CONFIG_SOURCE
+
+for f in /etc/gconf/schemas/*.schemas; do
+    gconftool-2 --makefile-install-rule "$f"
+done
diff --git a/src/triggers/triggers.d/0060immodules.trigger b/src/triggers/triggers.d/0060immodules.trigger
new file mode 100755 (executable)
index 0000000..daad42a
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Post-installation hook for GTK+ input method modules.  -*- mode: sh -*-
+#
+# Written by Matthias Clasen <mclasen@redhat.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: gtk-query-immodules-3.0
+# REMatch: /lib.*/gtk-3\.0/3\.0\.0/immodules/.*\.so
+
+gtk-query-immodules-3.0 --update-cache
diff --git a/src/triggers/triggers.d/0070pango.trigger b/src/triggers/triggers.d/0070pango.trigger
new file mode 100755 (executable)
index 0000000..6993546
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Post-installation hook for pango.  -*- mode: sh -*-
+# Corresponds to gdk-pixbuf/gdk-pixbuf/Makefile.am:install-data-hook
+#
+# Written by Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: pango-querymodules
+# REMatch: /lib.*/pango/.*/modules/.*\.so
+
+DEST=/etc/pango/pango.modules
+pango-querymodules --system > ${DEST}.tmp && mv ${DEST}.tmp ${DEST}
diff --git a/src/triggers/triggers.d/0080gtk+.trigger b/src/triggers/triggers.d/0080gtk+.trigger
new file mode 100755 (executable)
index 0000000..26b313f
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Post-installation hook for gtk icon cache.  -*- mode: sh -*-
+#
+# Written by Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: gtk-update-icon-cache
+# LiteralMatch: /share/icons/
+
+for dir in ./usr/share/icons/*; do
+  if test -f $dir/index.theme; then
+    if ! gtk-update-icon-cache --quiet $dir; then
+       echo "Failed to run gtk-update-icon-cache for $dir"
+       exit 1
+    fi
+  fi
+done
diff --git a/src/triggers/triggers.d/0090desktop-database.trigger b/src/triggers/triggers.d/0090desktop-database.trigger
new file mode 100755 (executable)
index 0000000..017d27c
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Post-installation hook for desktop files.  -*- mode: sh -*-
+#
+# Written by Matthias Clasen <mclasen@redhat.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# IfExecutable: update-desktop-database
+# REMatch: /share/applications/.*/.*\.desktop
+
+exec update-desktop-database -q ./usr/share/applications
diff --git a/src/triggers/triggers.d/dconf.trigger b/src/triggers/triggers.d/dconf.trigger
deleted file mode 100755 (executable)
index 335364c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Post-installation hook for system dconf schemas.  -*- mode: sh -*-
-#
-# Written by Colin Walters <walters@verbum.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: dconf
-# LiteralMatch: /etc/dconf/*
-
-exec dconf update
diff --git a/src/triggers/triggers.d/desktop-database.trigger b/src/triggers/triggers.d/desktop-database.trigger
deleted file mode 100755 (executable)
index 017d27c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Post-installation hook for desktop files.  -*- mode: sh -*-
-#
-# Written by Matthias Clasen <mclasen@redhat.com>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: update-desktop-database
-# REMatch: /share/applications/.*/.*\.desktop
-
-exec update-desktop-database -q ./usr/share/applications
diff --git a/src/triggers/triggers.d/gconf.trigger b/src/triggers/triggers.d/gconf.trigger
deleted file mode 100755 (executable)
index 8b4df90..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-# Post-installation hook for GConf.  -*- mode: sh -*-
-#
-# Written by Colin Walters <walters@verbum.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: gconftool-2
-# LiteralMatch: /etc/gconf
-
-GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
-export GCONF_CONFIG_SOURCE
-
-for f in /etc/gconf/schemas/*.schemas; do
-    gconftool-2 --makefile-install-rule "$f"
-done
diff --git a/src/triggers/triggers.d/gdk-pixbuf.trigger b/src/triggers/triggers.d/gdk-pixbuf.trigger
deleted file mode 100755 (executable)
index 07c84b0..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-# Post-installation hook for gdk-pixbuf.  -*- mode: sh -*-
-# Corresponds to gdk-pixbuf/gdk-pixbuf/Makefile.am:install-data-hook
-#
-# Written by Colin Walters <walters@verbum.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: gdk-pixbuf-query-loaders
-# RequiresChroot: true
-# LiteralMatch: /gdk-pixbuf-2.0/2.10.0/loaders/
-
-exec gdk-pixbuf-query-loaders --update-cache
diff --git a/src/triggers/triggers.d/glib.trigger b/src/triggers/triggers.d/glib.trigger
deleted file mode 100755 (executable)
index 734b672..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Post-installation hook for glib/gschema.  -*- mode: sh -*-
-#
-# Written by Colin Walters <walters@verbum.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: glib-compile-schemas
-# LiteralMatch: /share/glib-2.0/schemas/
-
-exec glib-compile-schemas ./usr/share/glib-2.0/schemas
diff --git a/src/triggers/triggers.d/gtk+.trigger b/src/triggers/triggers.d/gtk+.trigger
deleted file mode 100755 (executable)
index 26b313f..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-# Post-installation hook for gtk icon cache.  -*- mode: sh -*-
-#
-# Written by Colin Walters <walters@verbum.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: gtk-update-icon-cache
-# LiteralMatch: /share/icons/
-
-for dir in ./usr/share/icons/*; do
-  if test -f $dir/index.theme; then
-    if ! gtk-update-icon-cache --quiet $dir; then
-       echo "Failed to run gtk-update-icon-cache for $dir"
-       exit 1
-    fi
-  fi
-done
diff --git a/src/triggers/triggers.d/immodules.trigger b/src/triggers/triggers.d/immodules.trigger
deleted file mode 100755 (executable)
index daad42a..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Post-installation hook for GTK+ input method modules.  -*- mode: sh -*-
-#
-# Written by Matthias Clasen <mclasen@redhat.com>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: gtk-query-immodules-3.0
-# REMatch: /lib.*/gtk-3\.0/3\.0\.0/immodules/.*\.so
-
-gtk-query-immodules-3.0 --update-cache
diff --git a/src/triggers/triggers.d/ldconfig.trigger b/src/triggers/triggers.d/ldconfig.trigger
deleted file mode 100755 (executable)
index b412603..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Post-installation hook for shared libraries.  -*- mode: sh -*-
-#
-# Written by Colin Walters <walters@verbum.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: ldconfig
-# REMatch: /lib.*/\.so.*
-
-ldconfig -r .
diff --git a/src/triggers/triggers.d/mime-database.trigger b/src/triggers/triggers.d/mime-database.trigger
deleted file mode 100755 (executable)
index bfe301f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-# Post-installation hook for shared-mime-info.  -*- mode: sh -*-
-#
-# Written by Matthias Clasen <mclasen@redhat.com>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: update-mime-database
-# REMatch: /mime/packages/.*\.xml
-
-exec update-mime-database ./usr/share/mime
diff --git a/src/triggers/triggers.d/pango.trigger b/src/triggers/triggers.d/pango.trigger
deleted file mode 100755 (executable)
index 6993546..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-# Post-installation hook for pango.  -*- mode: sh -*-
-# Corresponds to gdk-pixbuf/gdk-pixbuf/Makefile.am:install-data-hook
-#
-# Written by Colin Walters <walters@verbum.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# IfExecutable: pango-querymodules
-# REMatch: /lib.*/pango/.*/modules/.*\.so
-
-DEST=/etc/pango/pango.modules
-pango-querymodules --system > ${DEST}.tmp && mv ${DEST}.tmp ${DEST}